package rmi.manger;import java.rmi.registry.LocateRegistry;import java.rmi.registry.Registry;import org.apache.log4j.Logger;/** * Rmi 链接管理类 *  * @author Felix *  */public class RmiManger {	/** 本类日志 */	private static Logger RmiMangerLogger = Logger.getLogger(RmiManger.class);	/**	 * 获取Rmi链接	 * 	 * @param rmiInfo	 * @return 返回Object	 * @throws Exception	 */	protected static Object rmiConnection(String rmiInfo, String action) throws Exception {		RmiMangerLogger.info("RmiManger\trmiConnection" + rmiInfo + "\t" + action);		String[] strings = rmiInfo.split(",");		String ip = strings[0];		String port = strings[1];		String name = strings[2];		Registry registry = LocateRegistry.getRegistry(ip, Integer.parseInt(port));		Object rmiObject = registry.lookup(name);		strings = null;		return rmiObject;	}}